#pragma once

#include <iostream>
#include <fstream>
#include <boost/algorithm/string.hpp>
#include "wininet.h"

//This class exists because we want to load from a resource
//just like from istream and "str.rdbuf()->pubsetbuf(buffer, sizeof(buffer));"
//doesn't work in VC++ (it works in gcc, though). So if we want to load from resource
//file like from a file we should write "BufferForResource bfr(buffer, sizeof(buffer)); istream istr(&bfr);"
class CBufferForResource : public std::basic_streambuf<char>
{
public:
	CBufferForResource(char* p, size_t n) {
	setg(p, p, p + n);
	}
};